import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
import axios from 'axios'
Vue.prototype.$axios = axios
import apiurl from './config/apiurl';
Vue.prototype.$apiurl=apiurl;

axios.interceptors.request.use(function (config) {
  var token = sessionStorage.getItem("token");
  if (token != "") {
    config.headers.Authorization = "Bearer " + token
  }
  return config;
})

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
